﻿@model Tasks.UI.Models.Power.AccountManageModel
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>系统设置</title>
    <link href="@Config.GetCssResourcePath("main.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/css/systemSetting.css")" rel="stylesheet" type="text/css" />
    <link href="@Config.GetCssResourcePath("table.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/jquery-impromptu.3.1.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-impromptu.3.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/global.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            initTable(".tblStyle1");
        })
        function showAssign(title, UserID) {
            var url = "/Power/AssignRole?UserID=" + UserID;
            openTab('授权', url, true)
        }

    </script>
</head>
<body>
    <div id="container" style="clear: both;">
        <form action="AccountManage" method="post">
        <div id="container">
            <div class="navTitle">
                <ul>
                    <li class="Home SecondLast"><a href="#">
                        <div class="HomeIcon">
                        </div>
                        <font><font>Home</font></font></a></li><li class="Last"><span><font><font>账户管理</font></font></span></li>
                </ul>
            </div>
            <h1>
                <font class="">账户管理</font>
            </h1>
            <p class="intro">
                <font>在该界面可以查看账户的账户信息</font>
            </p>
            <div class="searchBar">
                <div class="box">
                    <table>
                        <tr>
                            <td>
                                <label>
                                    <strong>名称</strong></label>
                                @Html.TextBoxFor(t => t.Name)
                                <label>
                                    <strong>所属权限组</strong></label>
                                @Html.DropDownList("RoleID", PageHelper.RoleSelector())
                                <input type="submit" value="查询" class="btnSearch" />
                            </td>
                        </tr>
                    </table>
                    <div class="bottom">
                    </div>
                </div>
            </div>
            <table class="tblStyle1" style="table-layout: fixed;">
                <thead>
                    <tr>
                        <th style="width: 10%">
                            账户状态
                        </th>
                        <th style="width: 15%">
                            名称
                        </th>
                        <th style="width: 15%">
                            账号
                        </th>
                        <th style="width: 15%">
                            最后登录
                        </th>
                        <th style="width: 25%">
                            所属权限组
                        </th>
                        <th style="width: 10%">
                            操作
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @Html.HiddenFor(t => t.act)
                    @foreach (EnterpriseMember enterprise in Model.EnterpriseList)
                    {
                        <tr>
                            <td class="c">
                                @PageHelper.EnterpriseStateToStr(enterprise.State)
                            </td>
                            <td class="c">
                                @enterprise.Name
                            </td>
                            <td class="c">
                                @enterprise.AccountNo
                            </td>
                            <td class="c">
                                @enterprise.LastLoginTime.ToShortDateString()
                            </td>
                            <td class="c">
                                @Tasks.Business.PowerBLL.GetRoleNames(enterprise.UserID)
                            </td>
                            <td class="c">
                                <input name="UserID" class="UserID" type="hidden" value="@enterprise.UserID"/>
                                <a href="javascript:void(0)" onclick="showAssign('授权','@enterprise.UserID')">
                                    <img src="/images/icon/16x16/group_key.png" title="授权" /></a>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
            @Html.RenderPageNav(Model.PageIndex, Model.PageSize, Model.RowCount, "", Tasks.Core.PageNavStyle.Form)
        </div>
        </form>
    </div>
</body>
</html>
